package com.sinodata.bsm.common.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * EventType entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "EVENT_TYPE")
public class EventType implements java.io.Serializable {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 8348162490276810687L;

    // Fields  
    private Long id;
    private String name;
    private Long resTypeId;
    private Long resId;
    private String code;
    private Integer recoverable;
    private String desc;
    private String expr;
    private String msg;
    private Integer catalog;
    private String objectExpr;

    // Constructors

    /** default constructor */
    public EventType() {
    }

    /** minimal constructor */
    public EventType(Long id) {
        this.id = id;
    }

    /** full constructor */
    public EventType(Long id, String name, Long resTypeId, Long resId, String code, Integer recoverable, String desc, String expr, String msg, Integer catalog, String objectExpr) {
        this.id = id;
        this.name = name;
        this.resTypeId = resTypeId;
        this.resId = resId;
        this.code = code;
        this.recoverable = recoverable;
        this.desc = desc;
        this.expr = expr;
        this.msg = msg;
        this.catalog = catalog;
        this.objectExpr = objectExpr;
    }

    // Property accessors
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequence")
    @SequenceGenerator(name = "sequence", sequenceName = "EVENT_TYPE_SEQ")
    @Column(name = "ID", unique = true, nullable = false, precision = 18, scale = 0)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "NAME", length = 128)
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Column(name = "RES_TYPE_ID", precision = 18, scale = 0)
    public Long getResTypeId() {
        return this.resTypeId;
    }

    public void setResTypeId(Long resTypeId) {
        this.resTypeId = resTypeId;
    }

    @Column(name = "RES_ID", precision = 18, scale = 0)
    public Long getResId() {
        return this.resId;
    }

    public void setResId(Long resId) {
        this.resId = resId;
    }

    @Column(name = "CODE", length = 128)
    public String getCode() {
        return this.code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Column(name = "RECOVERABLE", precision = 1, scale = 0)
    public Integer getRecoverable() {
        return this.recoverable;
    }

    public void setRecoverable(Integer recoverable) {
        this.recoverable = recoverable;
    }

    @Column(name = "DESC_", length = 256)
    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    @Column(name = "EXPR", length = 256)
    public String getExpr() {
        return this.expr;
    }

    public void setExpr(String expr) {
        this.expr = expr;
    }

    @Column(name = "MSG", length = 512)
    public String getMsg() {
        return this.msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Column(name = "CATALOG", precision = 2, scale = 0)
    public Integer getCatalog() {
        return this.catalog;
    }

    public void setCatalog(Integer catalog) {
        this.catalog = catalog;
    }

    @Column(name = "OBJECT_EXPR", length = 512)
    public String getObjectExpr() {
        return objectExpr;
    }

    public void setObjectExpr(String objectExpr) {
        this.objectExpr = objectExpr;
    }

    @Override
    public String toString() {
        return "EventType [id=" + id + ", name=" + name + ", resTypeId=" + resTypeId + ", resId=" + resId + ", code=" + code + ", recoverable=" + recoverable + ", desc=" + desc + ", expr=" + expr + ", msg=" + msg + ", catalog=" + catalog + "objectExpr=" + objectExpr + "]";
    }

}